import 'package:flutter/cupertino.dart';

import '../main.dart';

const Color resMainColor = Color(0xffDE271D);
const Color resBackgroundColor = Color(0xffF0F0F2);
const Color resBackgroundColorF2 = Color(0xffF2F2F4);
const Color resLineColor = Color(0xffE6E6E6);

const LinearGradient resMainGradient = LinearGradient(colors: [
  Color(0xffEF3E35),
  resMainColor,
]);

BorderRadius resBorderRadius({
  double topLeft = 0,
  double topRight = 0,
  double bottomLeft = 0,
  double bottomRight = 0,
}) {
  return BorderRadius.only(
    bottomLeft: Radius.circular(bottomLeft),
    topLeft: Radius.circular(topLeft),
    topRight: Radius.circular(topRight),
    bottomRight: Radius.circular(bottomRight),
  );
}

extension DpIntExtension on int {
  double get dp {
    final d=screenUtils.setWidth(this.toDouble());
    return d.toInt().toDouble();
  }

  double get sp {
    return (this.toDouble());
  }
}

extension DpDoubleExtension on double {
  double get dp {
    final d=screenUtils.setWidth(this);
    return d.toInt().toDouble();
  }
  double get sp {
    return (this.toDouble());
  }
}

const _defaultHeight = 1.1;
TextStyle resTextStyle =
    TextStyle(inherit: false, fontSize: 14.sp, height: _defaultHeight);
TextStyle resTextStyle30 = TextStyle(
    inherit: false,
    fontSize: 14.sp,
    color: Color(0xff302F2F),
    height: _defaultHeight);
TextStyle resTextStyle7A = TextStyle(
    inherit: false,
    fontSize: 14.sp,
    color: Color(0xff7A7878),
    height: _defaultHeight);
TextStyle resTextStyle6A = TextStyle(
    inherit: false,
    fontSize: 14.sp,
    color: Color(0xff6A6868),
    height: _defaultHeight);
TextStyle resTextStyle9C = TextStyle(
    inherit: false,
    fontSize: 14.sp,
    color: Color(0xff9C9C9C),
    height: _defaultHeight);
TextStyle resTextStyleMain = TextStyle(
    inherit: false,
    fontSize: 14.sp,
    color: resMainColor,
    height: _defaultHeight);
